<%@ page import="cn.NewsDao.NewsDao1" %>
<%@ page import="cn.NewsDaoImpl.NewsDaoImpl1" %>
<%@ page import="cn.entity.News1" %><%--
  Created by IntelliJ IDEA.
  User: 31052
  Date: 2022/4/7
  Time: 14:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
        <%
            String newsid=request.getParameter("newsid");
            //获取id
            if (newsid !=null || newsid !=""){
                int num = Integer.parseInt(newsid);
                //得到id后，传到实用类
                NewsDao1 newsDao1 = new NewsDaoImpl1();
                News1 news1 = newsDao1.selectById(num);

                session.setAttribute("news",news1);
                request.getRequestDispatcher("ModifyNews3.jsp").forward(request,response);
            }
        %>

</body>
</html>
